﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace HelenServer.Migrator;

[Table("zt_user")]
[Index("Account", Name = "account", IsUnique = true)]
[Index("Dept", Name = "dept")]
[Index("Email", Name = "email")]
public partial class ZtUser
{
    [Key]
    [Column("id", TypeName = "mediumint(8) unsigned")]
    public uint Id { get; set; }

    [Column("dept", TypeName = "mediumint(8) unsigned")]
    public uint Dept { get; set; }

    [Column("account")]
    [StringLength(30)]
    public string Account { get; set; } = null!;

    [Column("role")]
    [StringLength(10)]
    public string Role { get; set; } = null!;

    [Column("realname")]
    [StringLength(100)]
    public string Realname { get; set; } = null!;

    [Column("gender", TypeName = "enum('f','m')")]
    public string Gender { get; set; } = null!;

    [Column("email")]
    [StringLength(90)]
    public string Email { get; set; } = null!;

    [Column("join")]
    public DateOnly Join { get; set; }

    [Column("deleted", TypeName = "enum('0','1')")]
    public string Deleted { get; set; } = null!;

    [Column("clientStatus", TypeName = "enum('online','away','busy','offline')")]
    public string ClientStatus { get; set; } = null!;
}